<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
    <title>#{get 'title' /}</title>		
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <link rel="stylesheet" type="text/css" media="screen" href="@{'/public/stylesheets/main.css'}" />
    <link rel="shortcut icon" type="image/png"  href="@{'/public/images/favicon.png'}" />

    <link rel="stylesheet" type="text/css" media="screen" href="@{'/public/stylesheets/datatable_jui.css'}" />
    <link rel="stylesheet" type="text/css" media="screen" href="@{'/public/stylesheets/jquery-ui-1.8.4.custom.css'}" />

    <script src="@{'/public/javascripts/jquery-1.5.min.js'}" type="text/javascript" charset="utf-8"></script>
    <script src="@{'/public/javascripts/DataTables-1.7.5/media/js/jquery.dataTables.js'}" type="text/javascript" charset="utf-8"></script>

    <script type="text/javascript" charset="utf-8">
    $(document).ready(function() {
        oTable = $('#liste').dataTable({
            "bJQueryUI": true,
            "sPaginationType": "full_numbers"
        });
    } );
    </script>
</head>
<body>

    <div id="header">
        <div id="logo">
            SDIS
        </div>
        <ul id="tools">
            <b>${agent_fullname}</b>
            #{if agent_for}
            | <b> FOR ${agent_for} </b>
            #{/if}
            | <a href="@{Agents.monProfil}">Mon Profil</a>
            | <a href="@{Secure.logout()}">Déconnexion</a>
        </ul>
    </div>

    <div class="tabs">
        <a href="@{Stages.listStages}" class="tab">
            <div id="tab_stage" class="${request.controller == 'Stages' ? 'selected' : ''}" >
                Stages 
            </div>
        </a>
        <a href="@{Candidats.candidatures}" class="tab">
            <div id="tab_candidature" class="${request.action == 'Candidats.candidatures' || request.action == 'Candidats.demandeAnnulation' ? 'selected' : ''}" >
                Vos Candidatures
            </div>
        </a>
        #{if agent_responsable}
            <a href="@{CISServices.choixAutorisationCandidatures}" class="tab">
                <div id="tab_candidature" class="${request.controller == 'CISServices' ? 'selected' : ''}" >
                    Autorisation Candidatures
                </div>
            </a>
        #{/if}
        #{if resp}
            <a href="@{Candidats.validationCandidatures}" class="tab">
                <div id="tab_candidature" class="${request.action == 'Candidats.validationCandidatures' ? 'selected' : ''}" >
                    Validation Candidatures
                </div>
            </a>      
        #{if agent_for.toString() == '3' || agent_for.toString() == '4'}
        <a href="@{Candidats.listDemandeAnnulation}" class="tab">
            <div id="tab_candidature" class="${request.action == 'Candidats.listDemandeAnnulation' ? 'selected' : ''}" >
                Annulation des candidatures
            </div>
        </a>
        <a href="@{Candidats.gestionCandidatures}" class="tab">
            <div id="tab_candidature" class="${request.action == 'Candidats.gestionCandidatures' || request.action == 'Candidats.validation' || request.action == 'Candidats.annulation' || request.action == 'Candidats.listeAttente' || request.action == 'Candidats.ajouterCandidature' ? 'selected' : ''}" >
                Gérer les candidatures
            </div>
        </a>
        #{/if}
    </div>
    <div id="main">
        #{if flash.error}
        <p class="error">
            ${flash.error}
        </p>
        #{/if}
        #{if flash.success}
        <p class="success">${flash.success}</p>
        #{/if}
        #{doLayout /} 
    </div>

</body>
</html>